<?xml version="1.0" encoding="UTF-8"?>

<!--
    Document   : orderResult.xsl
    Created on : April 7, 2015, 7:57 PM
    Author     : TruongHoangLe
    Description:
        Purpose of transformation follows.
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html" indent="yes"/>

    <!-- TODO customize transformation rules 
         syntax recommendation http://www.w3.org/TR/xslt 
    -->
    <xsl:template match="/">
        <html>
            <body>
                <xsl:apply-templates/>
            </body>
        </html>
    </xsl:template>
    
    <xsl:template match="orders">
        <xsl:for-each select="order">
            <tr>
                <td class="productImage grid_2">
                    <xsl:value-of select="username"/>
                </td>
                <td>
                    <xsl:value-of select="bookingTime"/>
                </td>
                <td class="subtotal">
                    <xsl:value-of select="totalPrice"/>
                </td>
                <td>
                    <xsl:if test="statusID=1">
                        Processing
                    </xsl:if>
                    <xsl:if test="statusID=2">
                        Completed
                    </xsl:if>
                </td>
                <td>
                    <form action="ProcessServlet" method="POST">
                        <a href="ProcessServlet?btAction=Detail&amp;txtOrderID={orderID}">Details</a>
                    </form>
                </td>
            </tr>
        </xsl:for-each>
    </xsl:template>

</xsl:stylesheet>
